<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>注册</title>
    <script src="js/jquery-1.3.1.js"></script>
</head>
<body>
<button id="reg1">注册</button>

<script>
    $("button").click(function () {
        $.ajax({
                url: "/user/reg",
                data: JSON.stringify({username: "祖宗", password: "666"}),
                type: "post",
                contentType: "application/json;charset=utf-8",
                success: function (data) {
                    console.log(data)
                }
            }
        )
    })
</script>
</body>

</html>
